package com.mall.dao;

import com.mall.pojo.MmallUser;
import com.mall.pojo.MmallUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface MmallUserMapper {
    int countByExample(MmallUserExample example);

    int deleteByExample(MmallUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MmallUser record);

    int insertSelective(MmallUser record);

    List<MmallUser> selectByExample(MmallUserExample example);

    MmallUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MmallUser record, @Param("example") MmallUserExample example);

    int updateByExample(@Param("record") MmallUser record, @Param("example") MmallUserExample example);

    int updateByPrimaryKeySelective(MmallUser record);

    int updateByPrimaryKey(MmallUser record);

	int checkUserName(String username);

	int checkEmail(String str);

	MmallUser selectLogin(@Param("username") String username,@Param("password") String password);

	String selectQuestionByUsername(String username);

	int checkAnswer(@Param("username")String username, @Param("question")String question, @Param("answer")String answer);

	int updatePasswordByUsername(@Param("username")String username,@Param("newPassword")String newPassword);

	int checkPassword(@Param("oldPassword")String oldPassword,@Param("id")Integer id);

	int checkEmailByUserId(@Param("id")Integer id,@Param("email")String email);

	  
}